home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1989-04-01 | 8.1 KB | [TEXT/MPS ] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| ZX81 Sinclair BASIC (image/sinclairBASIC)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, Sat Apr 1 15:02:48 1989, modified Sat Apr 1 15:02:48 1989, creator 'MPS ', type ASCII, 7482 bytes "Offscreen.p" , at 0x1dba 598 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPS ] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 4f 66 66 73 63 72 | 65 65 6e 2e 70 00 00 00 |..Offscr|een.p...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 1d 3a 00 | 00 02 56 a0 5a db 68 a0 |......:.|..V.Z.h.|
|00000060| 5a db 68 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |Z.h.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 73 5c 00 00 |........|....s\..|
|00000080| 7b 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |{-------|--------|
|00000090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0d |--------|-------.|
|000000d0| 23 0d 23 09 41 70 70 6c | 65 20 4d 61 63 69 6e 74 |#.#.Appl|e Macint|
|000000e0| 6f 73 68 20 44 65 76 65 | 6c 6f 70 65 72 20 54 65 |osh Deve|loper Te|
|000000f0| 63 68 6e 69 63 61 6c 20 | 53 75 70 70 6f 72 74 0d |chnical |Support.|
|00000100| 23 0d 23 09 22 53 6b 69 | 70 70 79 20 57 68 69 74 |#.#."Ski|ppy Whit|
|00000110| 65 27 73 20 46 61 6d 6f | 75 73 20 48 69 67 68 20 |e's Famo|us High |
|00000120| 4c 65 76 65 6c 20 4f 66 | 66 2d 53 63 72 65 65 6e |Level Of|f-Screen|
|00000130| 20 4d 61 70 20 52 6f 75 | 74 69 6e 65 73 d3 0d 23 | Map Rou|tines..#|
|00000140| 0d 23 09 4f 66 66 73 63 | 72 65 65 6e 2e 70 09 09 |.#.Offsc|reen.p..|
|00000150| 2d 09 50 61 73 63 61 6c | 20 48 65 61 64 65 72 0d |-.Pascal| Header.|
|00000160| 23 0d 23 09 43 6f 70 79 | 72 69 67 68 74 20 a9 20 |#.#.Copy|right . |
|00000170| 31 39 38 39 20 41 70 70 | 6c 65 20 43 6f 6d 70 75 |1989 App|le Compu|
|00000180| 74 65 72 2c 20 49 6e 63 | 2e 0d 23 09 41 6c 6c 20 |ter, Inc|..#.All |
|00000190| 72 69 67 68 74 73 20 72 | 65 73 65 72 76 65 64 2e |rights r|eserved.|
|000001a0| 0d 23 09 54 68 65 20 63 | 68 61 72 61 63 74 65 72 |.#.The c|haracter|
|000001b0| 73 20 64 65 70 69 63 74 | 65 64 20 68 65 72 65 69 |s depict|ed herei|
|000001c0| 6e 20 28 65 78 63 65 70 | 74 20 53 6b 69 70 70 79 |n (excep|t Skippy|
|000001d0| 20 57 68 69 74 65 29 20 | 61 72 65 20 66 69 63 74 | White) |are fict|
|000001e0| 69 74 69 6f 75 73 2e 0d | 23 0d 23 09 56 65 72 73 |itious..|#.#.Vers|
|000001f0| 69 6f 6e 73 3a 09 0d 23 | 09 09 09 09 31 2e 30 30 |ions:..#|....1.00|
|00000200| 09 09 09 09 30 34 2f 38 | 39 0d 23 0d 23 09 43 6f |....04/8|9.#.#.Co|
|00000210| 6d 70 6f 6e 65 6e 74 73 | 3a 0d 23 09 09 09 09 4f |mponents|:.#....O|
|00000220| 66 66 73 63 72 65 65 6e | 2e 70 09 09 09 41 70 72 |ffscreen|.p...Apr|
|00000230| 69 6c 20 31 2c 20 31 39 | 38 38 0d 23 09 09 09 09 |il 1, 19|88.#....|
|00000240| 4f 66 66 73 63 72 65 65 | 6e 2e 69 6e 63 31 2e 70 |Offscree|n.inc1.p|
|00000250| 09 41 70 72 69 6c 20 31 | 2c 20 31 39 38 38 0d 23 |.April 1|, 1988.#|
|00000260| 0d 23 09 54 68 65 73 65 | 20 72 6f 75 74 69 6e 65 |.#.These| routine|
|00000270| 73 20 70 72 6f 76 69 64 | 65 20 61 20 68 69 67 68 |s provid|e a high|
|00000280| 2d 6c 65 76 65 6c 20 69 | 6e 74 65 72 66 61 63 65 |-level i|nterface|
|00000290| 20 74 6f 20 74 68 65 20 | 51 75 69 63 6b 44 72 61 | to the |QuickDra|
|000002a0| 77 20 26 20 43 6f 6c 6f | 72 0d 23 09 4d 61 6e 61 |w & Colo|r.#.Mana|
|000002b0| 67 65 72 20 72 6f 75 74 | 69 6e 65 73 20 77 68 69 |ger rout|ines whi|
|000002c0| 63 68 20 61 6c 6c 6f 77 | 20 74 68 65 20 63 72 65 |ch allow| the cre|
|000002d0| 61 74 69 6f 6e 20 61 6e | 64 20 6d 61 6e 69 70 75 |ation an|d manipu|
|000002e0| 6c 61 74 69 6f 6e 20 6f | 66 20 6f 66 66 2d 73 63 |lation o|f off-sc|
|000002f0| 72 65 65 6e 0d 23 09 62 | 69 74 6d 61 70 73 20 61 |reen.#.b|itmaps a|
|00000300| 6e 64 20 70 69 78 6d 61 | 70 73 2e 20 54 68 65 79 |nd pixma|ps. They|
|00000310| 20 61 72 65 20 64 65 73 | 69 67 6e 65 64 20 74 6f | are des|igned to|
|00000320| 20 72 75 6e 20 6f 6e 20 | 61 6e 79 20 6d 61 63 68 | run on |any mach|
|00000330| 69 6e 65 20 77 69 74 68 | 20 31 32 38 4b 20 6f 72 |ine with| 128K or|
|00000340| 0d 23 09 6c 61 74 65 72 | 20 52 4f 4d 73 20 28 73 |.#.later| ROMs (s|
|00000350| 6f 72 72 79 20 36 34 4b | 20 52 4f 4d 20 66 61 6e |orry 64K| ROM fan|
|00000360| 73 29 2e 0d 23 09 4e 6f | 74 65 20 74 68 61 74 20 |s)..#.No|te that |
|00000370| 74 68 65 20 64 65 73 69 | 67 6e 20 69 6e 63 6f 72 |the desi|gn incor|
|00000380| 70 6f 72 61 74 65 73 20 | 74 68 65 20 69 64 65 61 |porates |the idea|
|00000390| 20 74 68 61 74 20 79 6f | 75 20 63 61 6e 20 67 6f | that yo|u can go|
|000003a0| 20 61 6c 6f 6e 67 20 70 | 72 65 74 65 6e 64 69 6e | along p|retendin|
|000003b0| 67 0d 23 09 74 68 65 72 | 65 20 69 73 20 61 6e 20 |g.#.ther|e is an |
|000003c0| 6f 66 66 73 63 72 65 65 | 6e 20 62 75 66 66 65 72 |offscree|n buffer|
|000003d0| 20 65 76 65 6e 20 77 68 | 65 6e 20 6f 6e 65 20 63 | even wh|en one c|
|000003e0| 6f 75 6c 64 6e d5 74 20 | 62 65 20 61 6c 6c 6f 63 |ouldn.t |be alloc|
|000003f0| 61 74 65 64 2c 20 61 6e | 64 20 74 68 65 0d 23 09 |ated, an|d the.#.|
|00000400| 63 61 6c 6c 73 20 77 69 | 6c 6c 20 64 6f 20 6e 6f |calls wi|ll do no|
|00000410| 74 68 69 6e 67 2e 0d 23 | 0d 2d 2d 2d 2d 2d 2d 2d |thing..#|.-------|
|00000420| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000430| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000440| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000450| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000460| 2d 2d 2d 2d 2d 2d 2d 2d | 7d 0d 0d 55 4e 49 54 20 |--------|}..UNIT |
|00000470| 4f 66 66 73 63 72 65 65 | 6e 3b 0d 0d 0d 49 4e 54 |Offscree|n;...INT|
|00000480| 45 52 46 41 43 45 0d 0d | 0d 0d 09 55 53 45 53 20 |ERFACE..|...USES |
|00000490| 4d 65 6d 54 79 70 65 73 | 2c 20 51 75 69 63 6b 44 |MemTypes|, QuickD|
|000004a0| 72 61 77 2c 20 4f 53 49 | 6e 74 66 2c 20 54 6f 6f |raw, OSI|ntf, Too|
|000004b0| 6c 49 6e 74 66 3b 0d 0d | 0d 0d 43 4f 4e 53 54 0d |lIntf;..|..CONST.|
|000004c0| 09 6e 6f 44 65 76 69 63 | 65 49 6e 74 65 72 73 65 |.noDevic|eInterse|
|000004d0| 63 74 45 72 72 20 3d 20 | 2d 36 39 36 39 3b 0d 0d |ctErr = |-6969;..|
|000004e0| 09 6b 4d 61 78 44 65 70 | 74 68 20 3d 20 30 3b 0d |.kMaxDep|th = 0;.|
|000004f0| 09 0d 09 6b 4f 66 66 73 | 63 72 65 65 6e 52 65 73 |...kOffs|creenRes|
|00000500| 65 72 76 65 20 3d 20 38 | 31 39 36 3b 0d 0d 54 59 |erve = 8|196;..TY|
|00000510| 50 45 0d 09 42 69 74 4d | 61 70 48 61 6e 64 6c 65 |PE..BitM|apHandle|
|00000520| 09 3d 20 5e 42 69 74 4d | 61 70 50 74 72 3b 0d 09 |.= ^BitM|apPtr;..|
|00000530| 42 69 74 4d 61 70 50 74 | 72 09 09 3d 20 5e 42 69 |BitMapPt|r..= ^Bi|
|00000540| 74 4d 61 70 3b 0d 0d 0d | 0d 7b 4d 75 73 74 20 62 |tMap;...|.{Must b|
|00000550| 65 20 63 61 6c 6c 65 64 | 20 62 65 66 6f 72 65 20 |e called| before |
|00000560| 61 6e 79 20 72 6f 75 74 | 69 6e 65 73 20 6f 66 20 |any rout|ines of |
|00000570| 74 68 65 20 75 6e 69 74 | 20 61 72 65 20 75 73 65 |the unit| are use|
|00000580| 64 2e 7d 0d 0d 50 52 4f | 43 45 44 55 52 45 20 49 |d.}..PRO|CEDURE I|
|00000590| 6e 69 74 4f 66 66 73 63 | 72 65 65 6e 3b 0d 0d 0d |nitOffsc|reen;...|
|000005a0| 20 0d 7b 43 72 65 61 74 | 65 20 61 6e 20 6f 66 66 | .{Creat|e an off|
|000005b0| 2d 73 63 72 65 65 6e 20 | 70 69 78 65 6c 20 6d 61 |-screen |pixel ma|
|000005c0| 70 20 66 6f 72 20 64 72 | 61 77 69 6e 67 20 69 6e |p for dr|awing in|
|000005d0| 74 6f 20 61 6e 64 20 74 | 68 65 6e 20 62 6c 74 74 |to and t|hen bltt|
|000005e0| 69 6e 67 20 65 6c 73 65 | 77 68 65 72 65 2e 7d 0d |ing else|where.}.|
|000005f0| 0d 46 55 4e 43 54 49 4f | 4e 20 4e 65 77 4f 66 66 |.FUNCTIO|N NewOff|
|00000600| 73 63 72 65 65 6e 28 62 | 6f 75 6e 64 73 3a 20 52 |screen(b|ounds: R|
|00000610| 65 63 74 3b 20 64 65 70 | 74 68 3a 20 49 4e 54 45 |ect; dep|th: INTE|
|00000620| 47 45 52 3b 20 63 6f 6c | 6f 72 73 3a 20 43 54 61 |GER; col|ors: CTa|
|00000630| 62 48 61 6e 64 6c 65 3b | 0d 09 09 09 09 09 20 20 |bHandle;|...... |
|00000640| 6d 65 6d 6f 72 79 50 6f | 6c 69 74 65 3a 20 42 4f |memoryPo|lite: BO|
|00000650| 4f 4c 45 41 4e 3b 20 56 | 41 52 20 62 75 66 66 4e |OLEAN; V|AR buffN|
|00000660| 6f 74 4e 65 65 64 65 64 | 3a 20 42 4f 4f 4c 45 41 |otNeeded|: BOOLEA|
|00000670| 4e 3b 20 56 41 52 20 6f | 66 66 73 63 72 65 65 6e |N; VAR o|ffscreen|
|00000680| 48 61 6e 64 6c 65 3a 20 | 48 61 6e 64 6c 65 29 3a |Handle: |Handle):|
|00000690| 20 4f 53 45 72 72 3b 0d | 0d 7b 09 4d 65 6d 6f 72 | OSErr;.|.{.Memor|
|000006a0| 79 20 4d 61 6e 61 67 65 | 72 20 65 72 72 6f 72 73 |y Manage|r errors|
|000006b0| 20 6d 61 79 20 6f 63 63 | 75 72 2e 20 49 6e 20 61 | may occ|ur. In a|
|000006c0| 64 64 69 74 69 6f 6e 2c | 20 69 66 20 74 68 65 20 |ddition,| if the |
|000006d0| 72 65 71 75 65 73 74 65 | 64 20 64 65 70 74 68 20 |requeste|d depth |
|000006e0| 69 73 0d 09 6e 6f 74 20 | 73 75 70 70 6f 72 74 65 |is..not |supporte|
|000006f0| 64 20 62 79 20 51 75 69 | 63 6b 44 72 61 77 2c 20 |d by Qui|ckDraw, |
|00000700| 6d 65 6d 46 75 6c 6c 45 | 72 72 20 77 69 6c 6c 20 |memFullE|rr will |
|00000710| 62 65 20 72 65 74 75 72 | 6e 65 64 2e 0d 0d 09 62 |be retur|ned....b|
|00000720| 6f 75 6e 64 73 3a 0d 09 | 09 54 68 65 20 62 6f 75 |ounds:..|.The bou|
|00000730| 6e 64 73 20 72 65 63 74 | 61 6e 67 6c 65 20 74 6f |nds rect|angle to|
|00000740| 20 62 65 20 75 73 65 64 | 20 66 6f 72 20 74 68 65 | be used| for the|
|00000750| 20 70 69 78 6d 61 70 20 | 28 69 6e 20 67 6c 6f 62 | pixmap |(in glob|
|00000760| 61 6c 20 63 6f 6f 72 64 | 69 6e 61 74 65 73 29 2e |al coord|inates).|
|00000770| 0d 09 54 68 69 73 20 77 | 69 6c 6c 20 6f 66 74 65 |..This w|ill ofte|
|00000780| 6e 20 62 65 20 74 68 65 | 20 73 61 6d 65 20 61 73 |n be the| same as|
|00000790| 20 74 68 65 20 62 6f 75 | 6e 64 69 6e 67 20 72 65 | the bou|nding re|
|000007a0| 63 74 61 6e 67 6c 65 20 | 6f 66 20 61 20 70 6f 72 |ctangle |of a por|
|000007b0| 74 20 6f 72 20 77 69 6e | 64 6f 77 0d 09 74 6f 20 |t or win|dow..to |
|000007c0| 62 65 20 75 73 65 64 2e | 20 49 74 20 6d 75 73 74 |be used.| It must|
|000007d0| 20 62 65 20 69 6e 20 67 | 6c 6f 62 61 6c 20 63 6f | be in g|lobal co|
|000007e0| 6f 72 64 69 6e 61 74 65 | 73 2c 20 68 6f 77 65 76 |ordinate|s, howev|
|000007f0| 65 72 2c 20 73 6f 20 79 | 6f 75 20 63 61 6e 27 74 |er, so y|ou can't|
|00000800| 20 28 64 69 72 65 63 74 | 6c 79 29 0d 09 75 73 65 | (direct|ly)..use|
|00000810| 20 61 20 77 69 6e 64 6f | 77 27 73 20 70 6f 72 74 | a windo|w's port|
|00000820| 52 65 63 74 2e 0d 0d 09 | 54 68 65 20 62 6f 75 6e |Rect....|The boun|
|00000830| 64 73 20 77 69 6c 6c 20 | 62 65 20 6f 66 66 73 65 |ds will |be offse|
|00000840| 74 20 73 6f 20 74 68 61 | 74 20 74 6f 70 4c 65 66 |t so tha|t topLef|
|00000850| 74 20 69 73 20 61 74 20 | 28 30 2c 20 30 29 20 62 |t is at |(0, 0) b|
|00000860| 65 66 6f 72 65 20 73 65 | 74 74 69 6e 67 20 75 70 |efore se|tting up|
|00000870| 20 74 68 65 0d 09 6f 66 | 66 2d 73 63 72 65 65 6e | the..of|f-screen|
|00000880| 20 70 6f 72 74 2e 20 54 | 68 65 20 67 6c 6f 62 61 | port. T|he globa|
|00000890| 6c 20 76 65 72 73 69 6f | 6e 20 77 69 6c 6c 20 62 |l versio|n will b|
|000008a0| 65 20 73 74 6f 72 65 64 | 20 61 73 20 74 68 65 20 |e stored| as the |
|000008b0| 72 65 71 75 65 73 74 65 | 64 20 62 6f 75 6e 64 73 |requeste|d bounds|
|000008c0| 2c 0d 09 61 6e 64 20 75 | 70 64 61 74 65 64 20 62 |,..and u|pdated b|
|000008d0| 79 20 63 61 6c 6c 73 20 | 74 6f 20 4d 6f 76 65 4f |y calls |to MoveO|
|000008e0| 66 66 73 63 72 65 65 6e | 2e 0d 0d 09 09 4e 4f 54 |ffscreen|.....NOT|
|000008f0| 45 3a 20 69 66 20 79 6f | 75 27 6c 6c 20 70 61 73 |E: if yo|u'll pas|
|00000900| 73 20 69 6e 20 61 20 64 | 65 70 74 68 20 3e 20 30 |s in a d|epth > 0|
|00000910| 2c 20 79 6f 75 20 63 61 | 6e 20 75 73 65 20 61 20 |, you ca|n use a |
|00000920| 22 6c 6f 63 61 6c 22 20 | 62 6f 75 6e 64 73 52 65 |"local" |boundsRe|
|00000930| 63 74 2e 0d 0d 09 64 65 | 70 74 68 3a 0d 09 09 54 |ct....de|pth:...T|
|00000940| 68 65 20 64 65 73 69 72 | 65 64 20 70 69 78 65 6c |he desir|ed pixel|
|00000950| 20 64 65 70 74 68 20 6f | 66 20 74 68 65 20 6d 61 | depth o|f the ma|
|00000960| 70 2e 20 55 73 65 20 6b | 4d 61 78 44 65 70 74 68 |p. Use k|MaxDepth|
|00000970| 20 28 30 29 20 69 66 20 | 79 6f 75 20 77 61 6e 74 | (0) if |you want|
|00000980| 20 74 68 65 0d 09 6d 61 | 78 69 6d 75 6d 20 64 65 | the..ma|ximum de|
|00000990| 70 74 68 20 64 65 76 69 | 63 65 20 66 6f 72 20 74 |pth devi|ce for t|
|000009a0| 68 65 20 28 67 6c 6f 62 | 61 6c 29 20 62 6f 75 6e |he (glob|al) boun|
|000009b0| 64 73 20 72 65 63 74 61 | 6e 67 6c 65 2e 0d 0d 09 |ds recta|ngle....|
|000009c0| 63 6f 6c 6f 72 73 3a 20 | 28 6f 6e 6c 79 20 61 70 |colors: |(only ap|
|000009d0| 70 6c 69 65 73 20 69 66 | 20 64 65 70 74 68 20 3e |plies if| depth >|
|000009e0| 20 30 3b 20 69 67 6e 6f | 72 65 64 20 6f 74 68 65 | 0; igno|red othe|
|000009f0| 72 77 69 73 65 29 0d 09 | 09 54 68 65 20 63 6f 6c |rwise)..|.The col|
|00000a00| 6f 72 20 74 61 62 6c 65 | 20 79 6f 75 20 77 61 6e |or table| you wan|
|00000a10| 74 20 74 68 65 20 6f 66 | 66 2d 73 63 72 65 65 6e |t the of|f-screen|
|00000a20| 20 70 69 78 6d 61 70 20 | 74 6f 20 68 61 76 65 2e | pixmap |to have.|
|00000a30| 20 49 66 20 79 6f 75 20 | 70 61 73 73 20 69 6e 20 | If you |pass in |
|00000a40| 4e 49 4c 0d 09 74 68 65 | 20 63 6f 6c 6f 72 20 74 |NIL..the| color t|
|00000a50| 61 62 6c 65 20 66 72 6f | 6d 20 74 68 65 20 53 79 |able fro|m the Sy|
|00000a60| 73 74 65 6d 20 6f 72 20 | 52 4f 4d 20 28 66 6f 72 |stem or |ROM (for|
|00000a70| 20 74 68 61 74 20 64 65 | 70 74 68 29 20 77 69 6c | that de|pth) wil|
|00000a80| 6c 20 62 65 20 75 73 65 | 64 2e 0d 0d 09 6d 65 6d |l be use|d....mem|
|00000a90| 6f 72 79 50 6f 6c 69 74 | 65 3a 0d 09 09 49 66 20 |oryPolit|e:...If |
|00000aa0| 74 72 75 65 2c 20 74 68 | 65 20 62 69 74 73 20 77 |true, th|e bits w|
|00000ab0| 69 6c 6c 20 62 65 20 6b | 65 70 74 20 69 6e 20 61 |ill be k|ept in a|
|00000ac0| 20 70 75 72 67 65 61 62 | 6c 65 20 62 6c 6f 63 6b | purgeab|le block|
|00000ad0| 2e 20 49 66 20 69 74 20 | 67 65 74 73 20 70 75 72 |. If it |gets pur|
|00000ae0| 67 65 64 2c 20 74 68 65 | 6e 0d 09 43 68 65 63 6b |ged, the|n..Check|
|00000af0| 4f 66 66 73 63 72 65 65 | 6e 20 6f 72 20 43 68 65 |Offscree|n or Che|
|00000b00| 63 6b 42 6f 75 6e 64 73 | 4f 66 66 73 63 72 65 65 |ckBounds|Offscree|
|00000b10| 6e 20 77 69 6c 6c 20 72 | 65 61 6c 6c 6f 63 61 74 |n will r|eallocat|
|00000b20| 65 20 69 74 20 61 6e 64 | 20 61 20 72 65 64 72 61 |e it and| a redra|
|00000b30| 77 20 77 69 6c 6c 20 62 | 65 20 6e 65 65 64 65 64 |w will b|e needed|
|00000b40| 2e 0d 0d 09 6f 66 66 73 | 63 72 65 65 6e 48 61 6e |....offs|creenHan|
|00000b50| 64 6c 65 3a 0d 09 09 54 | 68 65 20 6e 65 77 20 68 |dle:...T|he new h|
|00000b60| 61 6e 64 6c 65 20 74 6f | 20 74 68 65 20 28 70 72 |andle to| the (pr|
|00000b70| 69 76 61 74 65 29 20 64 | 61 74 61 20 69 73 20 72 |ivate) d|ata is r|
|00000b80| 65 74 75 72 6e 65 64 20 | 69 6e 20 6f 66 66 73 63 |eturned |in offsc|
|00000b90| 72 65 65 6e 48 61 6e 64 | 6c 65 2e 0d 0d 09 41 20 |reenHand|le....A |
|00000ba0| 6e 65 77 20 67 72 61 70 | 68 69 63 73 20 64 65 76 |new grap|hics dev|
|00000bb0| 69 63 65 20 77 69 6c 6c | 20 62 65 20 63 72 65 61 |ice will| be crea|
|00000bc0| 74 65 64 20 69 66 20 72 | 65 71 75 65 73 74 65 64 |ted if r|equested|
|00000bd0| 44 65 70 74 68 20 3e 20 | 30 2e 20 4e 65 77 48 61 |Depth > |0. NewHa|
|00000be0| 6e 64 6c 65 20 77 69 6c | 6c 0d 09 62 65 20 75 73 |ndle wil|l..be us|
|00000bf0| 65 64 20 74 6f 20 61 6c | 6c 6f 63 61 74 65 20 73 |ed to al|locate s|
|00000c00| 74 6f 72 61 67 65 20 66 | 6f 72 20 74 68 65 20 61 |torage f|or the a|
|00000c10| 63 74 75 61 6c 20 70 69 | 78 65 6c 73 2e 0d 7d 0d |ctual pi|xels..}.|
|00000c20| 0d 0d 0d 7b 44 69 73 70 | 6f 73 65 20 6f 66 20 74 |...{Disp|ose of t|
|00000c30| 68 65 20 65 6e 74 69 72 | 65 20 6f 66 66 2d 73 63 |he entir|e off-sc|
|00000c40| 72 65 65 6e 20 64 61 74 | 61 20 73 74 72 75 63 74 |reen dat|a struct|
|00000c50| 75 72 65 2e 7d 0d 0d 50 | 52 4f 43 45 44 55 52 45 |ure.}..P|ROCEDURE|
|00000c60| 20 44 69 73 70 6f 73 65 | 4f 66 66 73 63 72 65 65 | Dispose|Offscree|
|00000c70| 6e 28 6f 66 66 73 63 72 | 65 65 6e 48 61 6e 64 6c |n(offscr|eenHandl|
|00000c80| 65 3a 20 48 61 6e 64 6c | 65 29 3b 0d 0d 0d 0d 7b |e: Handl|e);....{|
|00000c90| 50 72 65 70 61 72 65 20 | 74 6f 20 64 72 61 77 20 |Prepare |to draw |
|00000ca0| 74 6f 20 61 6e 20 6f 66 | 66 2d 73 63 72 65 65 6e |to an of|f-screen|
|00000cb0| 20 70 6f 72 74 20 61 6e | 64 20 6d 61 70 2e 20 54 | port an|d map. T|
|00000cc0| 68 65 20 70 6f 72 74 20 | 61 6e 64 20 68 61 6e 64 |he port |and hand|
|00000cd0| 6c 65 20 74 6f 20 74 68 | 65 20 62 69 74 73 0d 20 |le to th|e bits. |
|00000ce0| 77 69 6c 6c 20 62 65 20 | 6c 6f 63 6b 65 64 20 64 |will be |locked d|
|00000cf0| 6f 77 6e 2e 20 49 66 20 | 79 6f 75 20 64 6f 6e d5 |own. If |you don.|
|00000d00| 74 20 68 61 76 65 20 61 | 20 73 70 65 63 69 66 69 |t have a| specifi|
|00000d10| 63 20 70 6f 72 74 20 79 | 6f 75 20 77 61 6e 74 20 |c port y|ou want |
|00000d20| 74 6f 20 75 73 65 2c 20 | 70 61 73 73 0d 20 69 6e |to use, |pass. in|
|00000d30| 20 4e 49 4c 20 66 6f 72 | 20 70 6f 72 74 20 61 6e | NIL for| port an|
|00000d40| 64 20 74 68 65 20 70 72 | 69 76 61 74 65 20 6f 6e |d the pr|ivate on|
|00000d50| 65 20 66 6f 72 20 74 68 | 69 73 20 62 75 66 66 65 |e for th|is buffe|
|00000d60| 72 20 77 69 6c 6c 20 62 | 65 20 75 73 65 64 2e 0d |r will b|e used..|
|00000d70| 20 41 6c 74 68 6f 75 67 | 68 20 79 6f 75 20 63 61 | Althoug|h you ca|
|00000d80| 6e 20 75 73 65 20 74 68 | 69 73 20 66 6f 72 20 61 |n use th|is for a|
|00000d90| 20 62 75 66 66 65 72 65 | 64 20 77 69 6e 64 6f 77 | buffere|d window|
|00000da0| 20 61 6e 64 20 70 61 73 | 73 20 69 6e 20 74 68 65 | and pas|s in the|
|00000db0| 20 57 69 6e 64 6f 77 50 | 74 72 2c 0d 20 79 6f 75 | WindowP|tr,. you|
|00000dc0| 20 77 6f 75 6c 64 20 6e | 6f 72 6d 61 6c 6c 79 20 | would n|ormally |
|00000dd0| 75 73 65 20 42 65 67 69 | 6e 55 70 64 61 74 65 4f |use Begi|nUpdateO|
|00000de0| 66 66 73 63 72 65 65 6e | 20 69 6e 73 74 65 61 64 |ffscreen| instead|
|00000df0| 20 28 73 65 65 20 62 65 | 6c 6f 77 29 2e 7d 0d 0d | (see be|low).}..|
|00000e00| 50 52 4f 43 45 44 55 52 | 45 20 42 65 67 69 6e 4f |PROCEDUR|E BeginO|
|00000e10| 66 66 73 63 72 65 65 6e | 44 72 61 77 69 6e 67 28 |ffscreen|Drawing(|
|00000e20| 6f 66 66 73 63 72 65 65 | 6e 48 61 6e 64 6c 65 3a |offscree|nHandle:|
|00000e30| 20 48 61 6e 64 6c 65 3b | 20 70 6f 72 74 3a 20 47 | Handle;| port: G|
|00000e40| 72 61 66 50 74 72 29 3b | 0d 0d 0d 0d 7b 43 61 6c |rafPtr);|....{Cal|
|00000e50| 6c 20 74 68 69 73 20 77 | 68 65 6e 20 74 68 72 6f |l this w|hen thro|
|00000e60| 75 67 68 20 64 72 61 77 | 69 6e 67 20 74 6f 20 74 |ugh draw|ing to t|
|00000e70| 68 65 20 6f 66 66 2d 73 | 63 72 65 65 6e 20 6d 61 |he off-s|creen ma|
|00000e80| 70 2e 20 4d 75 73 74 20 | 6d 61 74 63 68 20 61 20 |p. Must |match a |
|00000e90| 70 72 65 76 69 6f 75 73 | 0d 20 53 74 61 72 74 44 |previous|. StartD|
|00000ea0| 4f 20 63 61 6c 6c 2c 20 | 6f 66 20 63 6f 75 72 73 |O call, |of cours|
|00000eb0| 65 2e 20 7d 0d 0d 50 52 | 4f 43 45 44 55 52 45 20 |e. }..PR|OCEDURE |
|00000ec0| 45 6e 64 4f 66 66 73 63 | 72 65 65 6e 44 72 61 77 |EndOffsc|reenDraw|
|00000ed0| 69 6e 67 28 6f 66 66 73 | 63 72 65 65 6e 48 61 6e |ing(offs|creenHan|
|00000ee0| 64 6c 65 3a 20 48 61 6e | 64 6c 65 29 3b 0d 0d 0d |dle: Han|dle);...|
|00000ef0| 0d 7b 43 68 65 63 6b 20 | 74 6f 20 73 65 65 20 69 |.{Check |to see i|
|00000f00| 66 20 74 68 65 20 64 65 | 70 74 68 20 6f 72 20 63 |f the de|pth or c|
|00000f10| 6f 6c 6f 72 20 74 61 62 | 6c 65 20 6f 66 20 74 68 |olor tab|le of th|
|00000f20| 65 20 70 72 69 6e 63 69 | 70 61 6c 20 67 72 61 70 |e princi|pal grap|
|00000f30| 68 69 63 20 64 65 76 69 | 63 65 0d 20 61 73 73 6f |hic devi|ce. asso|
|00000f40| 63 69 61 74 65 64 20 77 | 69 74 68 20 74 68 65 20 |ciated w|ith the |
|00000f50| 62 69 74 73 20 68 61 73 | 20 63 68 61 6e 67 65 64 |bits has| changed|
|00000f60| 2e 20 43 61 6c 6c 20 74 | 68 69 73 20 77 68 65 6e |. Call t|his when|
|00000f70| 20 79 6f 75 20 67 65 74 | 20 61 6e 20 75 70 64 61 | you get| an upda|
|00000f80| 74 65 20 65 76 65 6e 74 | 0d 20 74 68 61 74 20 72 |te event|. that r|
|00000f90| 65 6c 61 74 65 73 20 74 | 6f 20 74 68 69 73 20 62 |elates t|o this b|
|00000fa0| 75 66 66 65 72 2c 20 61 | 6e 64 20 69 66 20 79 6f |uffer, a|nd if yo|
|00000fb0| 75 20 68 61 76 65 20 73 | 6f 6d 65 20 69 64 6c 65 |u have s|ome idle|
|00000fc0| 20 74 69 6d 65 20 61 6e | 64 20 77 61 6e 74 20 74 | time an|d want t|
|00000fd0| 6f 20 72 65 64 72 61 77 | 0d 20 61 6e 79 20 70 61 |o redraw|. any pa|
|00000fe0| 72 74 20 6f 66 20 74 68 | 65 20 6f 66 66 73 63 72 |rt of th|e offscr|
|00000ff0| 65 65 6e 20 6d 61 70 20 | 74 68 61 74 20 69 73 20 |een map |that is |
|00001000| 69 6e 76 61 6c 69 64 2e | 0d 20 0d 20 46 6f 72 20 |invalid.|. . For |
|00001010| 62 75 66 66 65 72 65 64 | 20 77 69 6e 64 6f 77 73 |buffered| windows|
|00001020| 2c 20 63 61 6c 6c 20 74 | 68 69 73 20 72 69 67 68 |, call t|his righ|
|00001030| 74 20 62 65 66 6f 72 65 | 20 79 6f 75 20 63 61 6c |t before| you cal|
|00001040| 6c 20 42 65 67 69 6e 55 | 70 64 61 74 65 4f 66 66 |l BeginU|pdateOff|
|00001050| 73 63 72 65 65 6e 3b 20 | 64 6f 6e d5 74 0d 20 73 |screen; |don.t. s|
|00001060| 6b 69 70 20 74 68 65 20 | 42 65 67 69 6e 2d 20 45 |kip the |Begin- E|
|00001070| 6e 64 55 70 64 61 74 65 | 4f 66 66 73 63 72 65 65 |ndUpdate|Offscree|
|00001080| 6e 20 73 74 75 66 66 20 | 65 76 65 6e 20 69 66 20 |n stuff |even if |
|00001090| 64 72 61 77 4e 65 65 64 | 65 64 20 72 65 74 75 72 |drawNeed|ed retur|
|000010a0| 6e 73 20 46 41 4c 53 45 | 2e 0d 20 0d 20 64 72 61 |ns FALSE|.. . dra|
|000010b0| 77 4e 65 65 64 65 64 20 | 77 69 6c 6c 20 72 65 74 |wNeeded |will ret|
|000010c0| 75 72 6e 20 54 52 55 45 | 20 69 66 20 79 6f 75 20 |urn TRUE| if you |
|000010d0| 6e 65 65 64 20 74 6f 20 | 72 65 64 72 61 77 20 74 |need to |redraw t|
|000010e0| 68 65 20 63 6f 6e 74 65 | 6e 74 73 20 6f 66 20 74 |he conte|nts of t|
|000010f0| 68 65 20 6d 61 70 2e 0d | 20 54 68 65 20 72 65 73 |he map..| The res|
|00001100| 75 6c 74 2c 20 69 66 20 | 3c 3e 20 6e 6f 45 72 72 |ult, if |<> noErr|
|00001110| 2c 20 77 69 6c 6c 20 75 | 73 75 61 6c 6c 79 20 62 |, will u|sually b|
|00001120| 65 20 61 20 4d 65 6d 6f | 72 79 20 4d 61 6e 61 67 |e a Memo|ry Manag|
|00001130| 65 72 20 65 72 72 6f 72 | 20 69 6e 64 69 63 61 74 |er error| indicat|
|00001140| 69 6e 67 20 74 68 61 74 | 0d 20 74 68 65 20 62 6c |ing that|. the bl|
|00001150| 6f 63 6b 20 6f 66 20 62 | 69 74 73 20 66 6f 72 20 |ock of b|its for |
|00001160| 61 20 6e 65 77 20 28 67 | 72 65 61 74 65 72 29 20 |a new (g|reater) |
|00001170| 64 65 70 74 68 20 63 6f | 75 6c 64 6e 27 74 20 62 |depth co|uldn't b|
|00001180| 65 20 61 6c 6c 6f 63 61 | 74 65 64 2e 7d 0d 0d 46 |e alloca|ted.}..F|
|00001190| 55 4e 43 54 49 4f 4e 20 | 43 68 65 63 6b 4f 66 66 |UNCTION |CheckOff|
|000011a0| 73 63 72 65 65 6e 28 6f | 66 66 73 63 72 65 65 6e |screen(o|ffscreen|
|000011b0| 48 61 6e 64 6c 65 3a 20 | 48 61 6e 64 6c 65 3b 20 |Handle: |Handle; |
|000011c0| 56 41 52 20 64 72 61 77 | 4e 65 65 64 65 64 3a 20 |VAR draw|Needed: |
|000011d0| 42 4f 4f 4c 45 41 4e 29 | 3a 20 4f 53 45 72 72 3b |BOOLEAN)|: OSErr;|
|000011e0| 0d 0d 0d 0d 7b 43 61 6c | 6c 20 74 68 69 73 20 77 |....{Cal|l this w|
|000011f0| 68 65 6e 20 74 68 65 20 | 72 65 63 74 61 6e 67 6c |hen the |rectangl|
|00001200| 65 20 6f 66 20 74 68 65 | 20 6f 66 66 2d 73 63 72 |e of the| off-scr|
|00001210| 65 65 6e 20 6d 61 70 20 | 6e 65 65 64 73 20 74 6f |een map |needs to|
|00001220| 20 63 68 61 6e 67 65 2c | 20 70 65 72 68 61 70 73 | change,| perhaps|
|00001230| 0d 20 64 75 65 20 74 6f | 20 61 20 77 69 6e 64 6f |. due to| a windo|
|00001240| 77 20 6d 6f 76 69 6e 67 | 20 6f 6e 20 74 68 65 20 |w moving| on the |
|00001250| 6d 61 69 6e 20 73 63 72 | 65 65 6e 2e 20 54 68 69 |main scr|een. Thi|
|00001260| 73 20 77 69 6c 6c 20 61 | 6c 73 6f 20 63 68 65 63 |s will a|lso chec|
|00001270| 6b 20 66 6f 72 20 61 6e | 79 20 63 68 61 6e 67 65 |k for an|y change|
|00001280| 0d 20 69 6e 20 64 65 70 | 74 68 2e 0d 20 64 72 61 |. in dep|th.. dra|
|00001290| 77 4e 65 65 64 65 64 20 | 77 69 6c 6c 20 72 65 74 |wNeeded |will ret|
|000012a0| 75 72 6e 20 54 52 55 45 | 20 69 66 20 79 6f 75 20 |urn TRUE| if you |
|000012b0| 6e 65 65 64 20 74 6f 20 | 72 65 64 72 61 77 20 74 |need to |redraw t|
|000012c0| 68 65 20 63 6f 6e 74 65 | 6e 74 73 20 6f 66 20 74 |he conte|nts of t|
|000012d0| 68 65 20 6d 61 70 2e 0d | 20 54 68 65 20 72 65 73 |he map..| The res|
|000012e0| 75 6c 74 2c 20 69 66 20 | 3c 3e 20 6e 6f 45 72 72 |ult, if |<> noErr|
|000012f0| 2c 20 77 69 6c 6c 20 75 | 73 75 61 6c 6c 79 20 62 |, will u|sually b|
|00001300| 65 20 61 20 4d 65 6d 6f | 72 79 20 4d 61 6e 61 67 |e a Memo|ry Manag|
|00001310| 65 72 20 65 72 72 6f 72 | 20 69 6e 64 69 63 61 74 |er error| indicat|
|00001320| 69 6e 67 20 74 68 61 74 | 0d 20 74 68 65 20 62 6c |ing that|. the bl|
|00001330| 6f 63 6b 20 6f 66 20 62 | 69 74 73 20 66 6f 72 20 |ock of b|its for |
|00001340| 61 20 6e 65 77 20 28 67 | 72 65 61 74 65 72 29 20 |a new (g|reater) |
|00001350| 73 69 7a 65 20 28 6f 72 | 20 64 65 70 74 68 29 20 |size (or| depth) |
|00001360| 63 6f 75 6c 64 6e 27 74 | 20 62 65 20 61 6c 6c 6f |couldn't| be allo|
|00001370| 63 61 74 65 64 2e 7d 0d | 0d 46 55 4e 43 54 49 4f |cated.}.|.FUNCTIO|
|00001380| 4e 20 43 68 65 63 6b 42 | 6f 75 6e 64 73 4f 66 66 |N CheckB|oundsOff|
|00001390| 73 63 72 65 65 6e 28 6f | 66 66 73 63 72 65 65 6e |screen(o|ffscreen|
|000013a0| 48 61 6e 64 6c 65 3a 20 | 48 61 6e 64 6c 65 3b 20 |Handle: |Handle; |
|000013b0| 6e 65 77 42 6f 75 6e 64 | 73 3a 20 52 65 63 74 3b |newBound|s: Rect;|
|000013c0| 0d 09 09 09 09 09 20 20 | 20 56 41 52 20 64 72 61 |...... | VAR dra|
|000013d0| 77 4e 65 65 64 65 64 3a | 20 42 4f 4f 4c 45 41 4e |wNeeded:| BOOLEAN|
|000013e0| 29 3a 20 4f 53 45 72 72 | 3b 0d 0d 0d 0d 7b 57 68 |): OSErr|;....{Wh|
|000013f0| 65 6e 20 62 75 66 66 65 | 72 69 6e 67 20 74 68 65 |en buffe|ring the|
|00001400| 20 63 6f 6e 74 65 6e 74 | 73 20 6f 66 20 61 20 77 | content|s of a w|
|00001410| 69 6e 64 6f 77 2c 20 75 | 73 65 20 74 68 69 73 20 |indow, u|se this |
|00001420| 69 6e 73 74 65 61 64 20 | 6f 66 20 56 61 6c 69 64 |instead |of Valid|
|00001430| 52 65 63 74 2e 0d 20 49 | 66 20 6f 66 66 73 63 72 |Rect.. I|f offscr|
|00001440| 65 65 6e 48 61 6e 64 6c | 65 20 69 73 6e d5 74 20 |eenHandl|e isn.t |
|00001450| 61 20 62 75 66 66 65 72 | 20 66 6f 72 20 61 20 77 |a buffer| for a w|
|00001460| 69 6e 64 6f 77 2c 20 70 | 61 73 73 20 69 6e 20 4e |indow, p|ass in N|
|00001470| 49 4c 20 66 6f 72 20 74 | 68 65 20 77 69 6e 64 6f |IL for t|he windo|
|00001480| 77 20 70 61 72 61 6d 65 | 74 65 72 2e 7d 0d 0d 50 |w parame|ter.}..P|
|00001490| 52 4f 43 45 44 55 52 45 | 20 56 61 6c 69 64 52 65 |ROCEDURE| ValidRe|
|000014a0| 63 74 4f 66 66 73 63 72 | 65 65 6e 28 6f 66 66 73 |ctOffscr|een(offs|
|000014b0| 63 72 65 65 6e 48 61 6e | 64 6c 65 3a 20 48 61 6e |creenHan|dle: Han|
|000014c0| 64 6c 65 3b 20 77 69 6e | 64 6f 77 3a 20 57 69 6e |dle; win|dow: Win|
|000014d0| 64 6f 77 50 74 72 3b 20 | 76 61 6c 69 64 52 65 63 |dowPtr; |validRec|
|000014e0| 74 3a 20 52 65 63 74 29 | 3b 0d 0d 0d 0d 7b 57 68 |t: Rect)|;....{Wh|
|000014f0| 65 6e 20 62 75 66 66 65 | 72 69 6e 67 20 74 68 65 |en buffe|ring the|
|00001500| 20 63 6f 6e 74 65 6e 74 | 73 20 6f 66 20 61 20 77 | content|s of a w|
|00001510| 69 6e 64 6f 77 2c 20 75 | 73 65 20 74 68 69 73 20 |indow, u|se this |
|00001520| 69 6e 73 74 65 61 64 20 | 6f 66 20 56 61 6c 69 64 |instead |of Valid|
|00001530| 52 67 6e 2e 0d 20 49 66 | 20 6f 66 66 73 63 72 65 |Rgn.. If| offscre|
|00001540| 65 6e 48 61 6e 64 6c 65 | 20 69 73 6e d5 74 20 61 |enHandle| isn.t a|
|00001550| 20 62 75 66 66 65 72 20 | 66 6f 72 20 61 20 77 69 | buffer |for a wi|
|00001560| 6e 64 6f 77 2c 20 70 61 | 73 73 20 69 6e 20 4e 49 |ndow, pa|ss in NI|
|00001570| 4c 20 66 6f 72 20 74 68 | 65 20 77 69 6e 64 6f 77 |L for th|e window|
|00001580| 20 70 61 72 61 6d 65 74 | 65 72 2e 7d 0d 0d 50 52 | paramet|er.}..PR|
|00001590| 4f 43 45 44 55 52 45 20 | 56 61 6c 69 64 52 67 6e |OCEDURE |ValidRgn|
|000015a0| 4f 66 66 73 63 72 65 65 | 6e 28 6f 66 66 73 63 72 |Offscree|n(offscr|
|000015b0| 65 65 6e 48 61 6e 64 6c | 65 3a 20 48 61 6e 64 6c |eenHandl|e: Handl|
|000015c0| 65 3b 20 77 69 6e 64 6f | 77 3a 20 57 69 6e 64 6f |e; windo|w: Windo|
|000015d0| 77 50 74 72 3b 20 76 61 | 6c 69 64 52 65 67 69 6f |wPtr; va|lidRegio|
|000015e0| 6e 3a 20 52 67 6e 48 61 | 6e 64 6c 65 29 3b 0d 0d |n: RgnHa|ndle);..|
|000015f0| 0d 0d 7b 57 68 65 6e 20 | 62 75 66 66 65 72 69 6e |..{When |bufferin|
|00001600| 67 20 74 68 65 20 63 6f | 6e 74 65 6e 74 73 20 6f |g the co|ntents o|
|00001610| 66 20 61 20 77 69 6e 64 | 6f 77 2c 20 75 73 65 20 |f a wind|ow, use |
|00001620| 74 68 69 73 20 69 6e 73 | 74 65 61 64 20 6f 66 20 |this ins|tead of |
|00001630| 49 6e 76 61 6c 52 65 63 | 74 2e 0d 20 49 66 20 6f |InvalRec|t.. If o|
|00001640| 66 66 73 63 72 65 65 6e | 48 61 6e 64 6c 65 20 69 |ffscreen|Handle i|
|00001650| 73 6e d5 74 20 61 20 62 | 75 66 66 65 72 20 66 6f |sn.t a b|uffer fo|
|00001660| 72 20 61 20 77 69 6e 64 | 6f 77 2c 20 70 61 73 73 |r a wind|ow, pass|
|00001670| 20 69 6e 20 4e 49 4c 20 | 66 6f 72 20 74 68 65 20 | in NIL |for the |
|00001680| 77 69 6e 64 6f 77 20 70 | 61 72 61 6d 65 74 65 72 |window p|arameter|
|00001690| 2e 7d 0d 0d 50 52 4f 43 | 45 44 55 52 45 20 49 6e |.}..PROC|EDURE In|
|000016a0| 76 61 6c 52 65 63 74 4f | 66 66 73 63 72 65 65 6e |valRectO|ffscreen|
|000016b0| 28 6f 66 66 73 63 72 65 | 65 6e 48 61 6e 64 6c 65 |(offscre|enHandle|
|000016c0| 3a 20 48 61 6e 64 6c 65 | 3b 20 77 69 6e 64 6f 77 |: Handle|; window|
|000016d0| 3a 20 57 69 6e 64 6f 77 | 50 74 72 3b 20 69 6e 76 |: Window|Ptr; inv|
|000016e0| 61 6c 69 64 52 65 63 74 | 3a 20 52 65 63 74 29 3b |alidRect|: Rect);|
|000016f0| 0d 0d 0d 0d 7b 57 68 65 | 6e 20 62 75 66 66 65 72 |....{Whe|n buffer|
|00001700| 69 6e 67 20 74 68 65 20 | 63 6f 6e 74 65 6e 74 73 |ing the |contents|
|00001710| 20 6f 66 20 61 20 77 69 | 6e 64 6f 77 2c 20 75 73 | of a wi|ndow, us|
|00001720| 65 20 74 68 69 73 20 69 | 6e 73 74 65 61 64 20 6f |e this i|nstead o|
|00001730| 66 20 49 6e 76 61 6c 52 | 67 6e 2e 0d 20 49 66 20 |f InvalR|gn.. If |
|00001740| 6f 66 66 73 63 72 65 65 | 6e 48 61 6e 64 6c 65 20 |offscree|nHandle |
|00001750| 69 73 6e d5 74 20 61 20 | 62 75 66 66 65 72 20 66 |isn.t a |buffer f|
|00001760| 6f 72 20 61 20 77 69 6e | 64 6f 77 2c 20 70 61 73 |or a win|dow, pas|
|00001770| 73 20 69 6e 20 4e 49 4c | 20 66 6f 72 20 74 68 65 |s in NIL| for the|
|00001780| 20 77 69 6e 64 6f 77 20 | 70 61 72 61 6d 65 74 65 | window |paramete|
|00001790| 72 2e 7d 0d 0d 50 52 4f | 43 45 44 55 52 45 20 49 |r.}..PRO|CEDURE I|
|000017a0| 6e 76 61 6c 52 67 6e 4f | 66 66 73 63 72 65 65 6e |nvalRgnO|ffscreen|
|000017b0| 28 6f 66 66 73 63 72 65 | 65 6e 48 61 6e 64 6c 65 |(offscre|enHandle|
|000017c0| 3a 20 48 61 6e 64 6c 65 | 3b 20 77 69 6e 64 6f 77 |: Handle|; window|
|000017d0| 3a 20 57 69 6e 64 6f 77 | 50 74 72 3b 20 69 6e 76 |: Window|Ptr; inv|
|000017e0| 61 6c 69 64 52 67 6e 3a | 20 52 67 6e 48 61 6e 64 |alidRgn:| RgnHand|
|000017f0| 6c 65 29 3b 0d 0d 0d 0d | 7b 47 65 74 20 61 20 6d |le);....|{Get a m|
|00001800| 61 70 20 70 6f 69 6e 74 | 65 72 2c 20 73 75 69 74 |ap point|er, suit|
|00001810| 61 62 6c 65 20 66 6f 72 | 20 43 6f 70 79 42 69 74 |able for| CopyBit|
|00001820| 73 2e 20 4e 6f 74 65 20 | 74 68 61 74 20 6e 65 69 |s. Note |that nei|
|00001830| 74 68 65 72 20 74 68 65 | 20 6d 61 70 0d 20 69 74 |ther the| map. it|
|00001840| 73 65 6c 66 2c 20 6e 6f | 72 20 74 68 65 20 62 69 |self, no|r the bi|
|00001850| 74 73 20 70 6f 69 6e 74 | 65 64 20 74 6f 20 61 72 |ts point|ed to ar|
|00001860| 65 20 6c 6f 63 6b 65 64 | 20 64 6f 77 6e 2e 20 54 |e locked| down. T|
|00001870| 68 75 73 20 74 68 69 73 | 20 6d 61 70 2c 20 61 6e |hus this| map, an|
|00001880| 64 0d 20 74 68 65 20 62 | 69 74 73 20 70 6f 69 6e |d. the b|its poin|
|00001890| 74 65 64 20 74 6f 20 62 | 79 20 47 65 74 4d 61 70 |ted to b|y GetMap|
|000018a0| 5e 2e 62 61 73 65 41 64 | 64 72 20 77 69 6c 6c 20 |^.baseAd|dr will |
|000018b0| 6d 6f 76 65 2e 20 41 6c | 73 6f 20 6e 6f 74 65 20 |move. Al|so note |
|000018c0| 74 68 61 74 20 74 68 69 | 73 0d 20 77 69 6c 6c 20 |that thi|s. will |
|000018d0| 62 65 20 61 20 42 69 74 | 4d 61 70 50 74 72 20 66 |be a Bit|MapPtr f|
|000018e0| 6f 72 20 43 6c 61 73 73 | 69 63 20 51 44 20 73 79 |or Class|ic QD sy|
|000018f0| 73 74 65 6d 73 2c 20 61 | 6e 64 20 77 69 6c 6c 20 |stems, a|nd will |
|00001900| 62 65 20 61 20 50 69 78 | 4d 61 70 50 74 72 0d 20 |be a Pix|MapPtr. |
|00001910| 66 6f 72 20 43 6f 6c 6f | 72 20 51 44 20 73 79 73 |for Colo|r QD sys|
|00001920| 74 65 6d 73 2e 20 4e 49 | 4c 20 77 69 6c 6c 20 62 |tems. NI|L will b|
|00001930| 65 20 72 65 74 75 72 6e | 65 64 20 69 66 20 74 68 |e return|ed if th|
|00001940| 65 72 65 20 61 72 65 20 | 6e 6f 20 62 69 74 73 2e |ere are |no bits.|
|00001950| 20 49 74 0d 20 6d 61 79 | 20 62 65 20 70 6f 73 73 | It. may| be poss|
|00001960| 69 62 6c 65 20 74 6f 20 | 72 65 2d 61 6c 6c 6f 63 |ible to |re-alloc|
|00001970| 61 74 65 20 74 68 65 6d | 20 77 69 74 68 20 43 68 |ate them| with Ch|
|00001980| 65 63 6b 4f 66 66 73 63 | 72 65 65 6e 2e 7d 0d 0d |eckOffsc|reen.}..|
|00001990| 46 55 4e 43 54 49 4f 4e | 20 47 65 74 4d 61 70 28 |FUNCTION| GetMap(|
|000019a0| 6f 66 66 73 63 72 65 65 | 6e 48 61 6e 64 6c 65 3a |offscree|nHandle:|
|000019b0| 20 48 61 6e 64 6c 65 29 | 3a 20 42 69 74 4d 61 70 | Handle)|: BitMap|
|000019c0| 50 74 72 3b 0d 0d 0d 0d | 7b 52 65 74 75 72 6e 73 |Ptr;....|{Returns|
|000019d0| 20 61 20 68 61 6e 64 6c | 65 20 74 6f 20 74 68 65 | a handl|e to the|
|000019e0| 20 62 69 74 73 2e 20 4e | 49 4c 20 6d 65 61 6e 73 | bits. N|IL means|
|000019f0| 20 65 69 74 68 65 72 20 | 74 68 61 74 20 69 74 20 | either |that it |
|00001a00| 67 6f 74 20 70 75 72 67 | 65 64 2c 20 6f 72 0d 20 |got purg|ed, or. |
|00001a10| 74 68 61 74 20 74 68 65 | 20 62 69 74 73 20 61 72 |that the| bits ar|
|00001a20| 65 6e d5 74 20 69 6e 20 | 61 20 68 65 61 70 20 62 |en.t in |a heap b|
|00001a30| 6c 6f 63 6b 20 61 66 74 | 65 72 20 61 6c 6c 2e 7d |lock aft|er all.}|
|00001a40| 0d 0d 46 55 4e 43 54 49 | 4f 4e 20 47 65 74 42 69 |..FUNCTI|ON GetBi|
|00001a50| 74 73 48 61 6e 64 6c 65 | 28 6f 66 66 73 63 72 65 |tsHandle|(offscre|
|00001a60| 65 6e 48 61 6e 64 6c 65 | 3a 20 48 61 6e 64 6c 65 |enHandle|: Handle|
|00001a70| 29 3a 20 48 61 6e 64 6c | 65 3b 0d 0d 0d 0d 7b 2d |): Handl|e;....{-|
|00001a80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 20 48 65 72 65 20 61 |--------|- Here a|
|00001a90| 72 65 20 72 6f 75 74 69 | 6e 65 73 20 73 70 65 63 |re routi|nes spec|
|00001aa0| 69 66 69 63 20 74 6f 20 | 62 75 66 66 65 72 65 64 |ific to |buffered|
|00001ab0| 20 77 69 6e 64 6f 77 73 | 20 2d 2d 2d 2d 2d 2d 2d | windows| -------|
|00001ac0| 2d 2d 2d 7d 0d 09 0d 0d | 7b 43 72 65 61 74 65 20 |---}....|{Create |
|00001ad0| 61 6e 20 6f 66 66 2d 73 | 63 72 65 65 6e 20 70 69 |an off-s|creen pi|
|00001ae0| 78 65 6c 20 6d 61 70 20 | 66 6f 72 20 61 20 70 6f |xel map |for a po|
|00001af0| 72 74 2e 0d 20 49 74 20 | 77 69 6c 6c 20 61 6c 77 |rt.. It |will alw|
|00001b00| 61 79 73 20 75 73 65 20 | 6b 4d 61 78 44 65 70 74 |ays use |kMaxDept|
|00001b10| 68 20 61 6e 64 20 61 6c | 77 61 79 73 20 62 65 20 |h and al|ways be |
|00001b20| 6d 65 6d 6f 72 79 50 6f | 6c 69 74 65 20 28 3f 3f |memoryPo|lite (??|
|00001b30| 3f 61 6e 64 20 73 68 6f | 75 6c 64 6e d5 74 20 72 |?and sho|uldn.t r|
|00001b40| 65 74 75 72 6e 20 62 75 | 66 66 4e 6f 74 4e 65 65 |eturn bu|ffNotNee|
|00001b50| 64 65 64 3f 29 2e 7d 0d | 0d 46 55 4e 43 54 49 4f |ded?).}.|.FUNCTIO|
|00001b60| 4e 20 4e 65 77 4f 66 66 | 73 63 72 65 65 6e 46 6f |N NewOff|screenFo|
|00001b70| 72 57 69 6e 64 6f 77 28 | 77 69 6e 64 6f 77 3a 20 |rWindow(|window: |
|00001b80| 57 69 6e 64 6f 77 50 74 | 72 3b 20 56 41 52 20 62 |WindowPt|r; VAR b|
|00001b90| 75 66 66 4e 6f 74 4e 65 | 65 64 65 64 3a 20 42 4f |uffNotNe|eded: BO|
|00001ba0| 4f 4c 45 41 4e 3b 0d 09 | 09 09 09 09 09 09 20 20 |OLEAN;..|...... |
|00001bb0| 20 56 41 52 20 6f 66 66 | 73 63 72 65 65 6e 48 61 | VAR off|screenHa|
|00001bc0| 6e 64 6c 65 3a 20 48 61 | 6e 64 6c 65 29 3a 20 4f |ndle: Ha|ndle): O|
|00001bd0| 53 45 72 72 3b 0d 0d 0d | 0d 7b 57 68 65 6e 20 62 |SErr;...|.{When b|
|00001be0| 75 66 66 65 72 69 6e 67 | 20 61 20 77 69 6e 64 6f |uffering| a windo|
|00001bf0| 77 20 79 6f 75 20 73 68 | 6f 75 6c 64 20 75 73 65 |w you sh|ould use|
|00001c00| 20 74 68 69 73 20 69 6e | 73 74 65 61 64 20 6f 66 | this in|stead of|
|00001c10| 20 42 65 67 69 6e 55 70 | 64 61 74 65 2e 20 54 68 | BeginUp|date. Th|
|00001c20| 65 20 76 69 73 52 67 6e | 0d 20 77 69 6c 6c 20 62 |e visRgn|. will b|
|00001c30| 65 20 73 65 74 75 70 20 | 70 72 6f 70 65 72 6c 79 |e setup |properly|
|00001c40| 2e 20 77 69 6e 64 6f 77 | 20 6d 75 73 74 20 62 65 |. window| must be|
|00001c50| 20 61 20 76 61 6c 69 64 | 20 77 69 6e 64 6f 77 20 | a valid| window |
|00001c60| 28 64 6f 6e d5 74 20 70 | 61 73 73 20 69 6e 20 4e |(don.t p|ass in N|
|00001c70| 49 4c 29 2e 0d 20 43 61 | 6c 6c 20 45 6e 64 55 70 |IL).. Ca|ll EndUp|
|00001c80| 64 61 74 65 4f 66 66 73 | 63 72 65 65 6e 20 77 68 |dateOffs|creen wh|
|00001c90| 65 6e 20 79 6f 75 20 61 | 72 65 20 74 68 72 6f 75 |en you a|re throu|
|00001ca0| 67 68 20 64 72 61 77 69 | 6e 67 2e 7d 0d 20 0d 50 |gh drawi|ng.}. .P|
|00001cb0| 52 4f 43 45 44 55 52 45 | 20 42 65 67 69 6e 55 70 |ROCEDURE| BeginUp|
|00001cc0| 64 61 74 65 4f 66 66 73 | 63 72 65 65 6e 28 6f 66 |dateOffs|creen(of|
|00001cd0| 66 73 63 72 65 65 6e 48 | 61 6e 64 6c 65 3a 20 48 |fscreenH|andle: H|
|00001ce0| 61 6e 64 6c 65 3b 20 77 | 69 6e 64 6f 77 3a 20 57 |andle; w|indow: W|
|00001cf0| 69 6e 64 6f 77 50 74 72 | 29 3b 0d 0d 0d 0d 7b 54 |indowPtr|);....{T|
|00001d00| 68 65 20 73 65 71 75 65 | 6e 63 65 20 69 73 20 42 |he seque|nce is B|
|00001d10| 65 67 69 6e 55 70 64 61 | 74 65 4f 66 66 73 63 72 |eginUpda|teOffscr|
|00001d20| 65 65 6e 2c 20 64 72 61 | 77 2c 20 45 6e 64 55 70 |een, dra|w, EndUp|
|00001d30| 64 61 74 65 4f 66 66 73 | 63 72 65 65 6e 7d 0d 0d |dateOffs|creen}..|
|00001d40| 50 52 4f 43 45 44 55 52 | 45 20 45 6e 64 55 70 64 |PROCEDUR|E EndUpd|
|00001d50| 61 74 65 4f 66 66 73 63 | 72 65 65 6e 28 6f 66 66 |ateOffsc|reen(off|
|00001d60| 73 63 72 65 65 6e 48 61 | 6e 64 6c 65 3a 20 48 61 |screenHa|ndle: Ha|
|00001d70| 6e 64 6c 65 3b 20 77 69 | 6e 64 6f 77 3a 20 57 69 |ndle; wi|ndow: Wi|
|00001d80| 6e 64 6f 77 50 74 72 29 | 3b 0d 0d 0d 0d 0d 49 4d |ndowPtr)|;.....IM|
|00001d90| 50 4c 45 4d 45 4e 54 41 | 54 49 4f 4e 0d 0d 7b 24 |PLEMENTA|TION..{$|
|00001da0| 49 20 4f 66 66 73 63 72 | 65 65 6e 2e 69 6e 63 31 |I Offscr|een.inc1|
|00001db0| 2e 70 7d 0d 0d 45 4e 44 | 2e 0d 00 00 00 00 00 00 |.p}..END|........|
|00001dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e00| 00 00 01 00 00 00 01 f0 | 00 00 00 f0 00 00 00 66 |........|.......f|
|00001e10| 00 00 00 fa 00 45 03 00 | 00 00 00 00 00 00 00 00 |.....E..|........|
|00001e20| 00 00 00 46 0d 45 6e 74 | 69 74 79 20 45 64 69 74 |...F.Ent|ity Edit|
|00001e30| 0b 4f 66 66 73 63 72 65 | 65 6e 2e 70 02 00 00 00 |.Offscre|en.p....|
|00001e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e70| 00 00 a0 a1 88 eb 00 00 | 00 00 00 00 02 56 06 00 |........|.....V..|
|00001e80| 9a 67 13 71 9c 5b 77 a4 | 00 00 00 00 00 00 00 00 |.g.q.[w.|........|
|00001e90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 18 ae |........|........|
|00001ea0| 00 02 00 00 00 00 00 00 | 00 00 18 ad 00 01 00 00 |........|........|
|00001eb0| 00 00 00 00 00 00 00 00 | 00 00 10 00 00 00 00 fa |........|........|
|00001ec0| 0a 41 73 70 65 63 74 2e | 61 2e 6f 63 02 00 00 00 |.Aspect.|a.oc....|
|00001ed0| 4f 42 4a 20 4d 50 53 20 | 01 00 00 14 00 00 00 00 |OBJ MPS |........|
|00001ee0| 00 00 01 f8 00 00 00 00 | 01 b2 00 00 06 00 00 00 |........|........|
|00001ef0| 00 00 00 00 00 00 00 00 | 9c 70 cb 93 9c 70 cb 95 |........|.p...p..|
|00001f00| 00 00 00 02 01 e0 00 00 | 00 1a 00 00 50 6e 01 31 |........|....Pn.1|
|00001f10| 00 00 88 1c 0f 55 70 64 | 61 74 65 4f 66 66 73 63 |.....Upd|ateOffsc|
|00001f20| 72 65 65 6e 00 00 00 48 | 00 09 4d 6f 6e 61 63 6f |reen...H|..Monaco|
|00001f30| 00 72 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.r......|........|
|00001f40| 00 00 00 00 00 00 00 00 | 00 00 00 06 00 04 00 27 |........|.......'|
|00001f50| 00 00 01 df 02 30 00 64 | 00 1c 01 dd 02 3d a0 72 |.....0.d|.....=.r|
|00001f60| 1a 66 00 00 00 00 00 00 | 00 00 00 00 00 00 01 00 |.f......|........|
|00001f70| 00 00 00 7c 00 04 00 00 | 08 b4 00 00 08 b4 13 4e |...|....|.......N|
|00001f80| 65 77 4f 66 66 73 63 72 | 65 65 6e 20 64 65 63 6c |ewOffscr|een decl|
|00001f90| 2e 00 00 00 0d 8a 00 00 | 0d 8a 1b 42 65 67 69 6e |........|...Begin|
|00001fa0| 4f 66 66 73 63 72 65 65 | 6e 44 72 61 77 69 6e 67 |Offscree|nDrawing|
|00001fb0| 20 64 65 63 6c 2e 00 00 | 19 19 00 00 19 19 0d 47 | decl...|.......G|
|00001fc0| 65 74 4d 61 70 20 64 65 | 63 6c 2e 00 00 00 1a e2 |etMap de|cl......|
|00001fd0| 00 00 1a e2 1b 4e 65 77 | 4f 66 66 73 63 72 65 65 |.....New|Offscree|
|00001fe0| 6e 46 6f 72 57 69 6e 64 | 6f 77 20 64 65 63 6c 2e |nForWind|ow decl.|
|00001ff0| 00 00 01 00 00 00 01 f0 | 00 00 00 f0 00 00 00 66 |........|.......f|
|00002000| 00 16 a5 64 07 5a 00 00 | 00 1c 00 66 00 02 45 51 |...d.Z..|...f..EQ|
|00002010| 45 44 00 00 00 1a 45 4d | 52 4b 00 00 00 26 4d 50 |ED....EM|RK...&MP|
|00002020| 53 52 00 01 00 32 03 eb | ff ff 00 00 00 00 00 00 |SR...2..|........|
|00002030| 00 00 03 eb ff ff 00 00 | 00 06 00 00 00 00 03 ed |........|........|
|00002040| ff ff 00 00 00 24 00 00 | 00 00 03 ef ff ff 00 00 |.....$..|........|
|00002050| 00 70 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.p......|........|
|00002060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+